<template>
  <!-- 放置一个图标 -->
  <div>
    <!-- 放置一个svg的图标 -->
    <svg-icon icon-class="fullscreen" style="color:#fff; width: 20px; height: 20px" @click="onFullScreen" />
  </div>
</template>

<script>
import ScreenFull from 'screenfull'

export default {
  data() {
    return {

    }
  },

  created() {

  },

  methods: {
    onFullScreen() {
      // 如果是4.2 ScreenFull.enabled
      if (!ScreenFull.isEnabled) {
        return this.$message.error('暂不支持全屏')
      }
      ScreenFull.toggle()
    }
  }
}
</script>

<style scoped lang='less'>

</style>
